package com.yonyou.pmclouds.externalservice.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.externalservice.entity.FailedExternalRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FailedExternalRecordMapper extends BaseMapper<FailedExternalRecordVO> {

    FailedExternalRecordVO[] getFailedRecordByUser(@Param("tenantId") String tenantId, @Param("userId") String userId,
                                                   @Param("serviceSrc") String serviceSrc,
                                                   @Param("pageStart") int pageStart, @Param("pageSize") int pageSize);

    int countFailedRecordByUser(@Param("tenantId") String tenantId, @Param("userId") String userId,
                                @Param("serviceSrc") String serviceSrc);

    FailedExternalRecordVO queryRecordByPkBill(@Param("pkBill") String pkBill);

    List<FailedExternalRecordVO> queryByPkBills(@Param("pkBills") List<String> pkBills);

}
